package org.blogwu.sso.until.redisUntil.jdeis;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "redis.cache")
public class RedisProperties {

	private static  String  PREFIX="blogwuSso";
	 
	   public static String getPREFIX() {
		return PREFIX;
	}

	public static void setPREFIX(String pREFIX) {
		PREFIX = pREFIX;
	}

	public int getMaxWaitMillis() {
		return maxWaitMillis;
	}

	public void setMaxWaitMillis(int maxWaitMillis) {
		this.maxWaitMillis = maxWaitMillis;
	}

		//设置key过期时间
		private int    expireSeconds;
		
		private String clusterNodes;
		
		//客户端超时时间单位是毫秒    这里的timeout表示从redis-server读取数据的超时时间，默认的是2s，当数据量比较大的时候，可以考虑增大timeout。
		private int    commandTimeout;
		
	   //最大连接数  
		private int maxActive;
	    
	     //最大等待连接中的数量,设 0 为没有限制 
		private int maxIdle;
	    
	    
		//最小空闲数  
		private int  minIdle;
		
		//重试次数，在执行失败后，进行的重试次数，默认是5, 采取默认
		private int   maxRedirections;
		
		//最大建立连接等待时间 单位为 ms, 超过时间会出错误信息
		private int maxWaitMillis;
		

		
		//是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
		private boolean testOnBorrow;
	
	public static String  INITIALIZEREDISUSERNAME="initializeRedisUsername";

	
	
	
	/** 自动代码生成 **/
	public int getExpireSeconds() {
		return expireSeconds;
	}

	public void setExpireSeconds(int expireSeconds) {
		this.expireSeconds = expireSeconds;
	}

	public String getClusterNodes() {
		return clusterNodes;
	}

	public void setClusterNodes(String clusterNodes) {
		this.clusterNodes = clusterNodes;
	}

	public int getCommandTimeout() {
		return commandTimeout;
	}

	public void setCommandTimeout(int commandTimeout) {
		this.commandTimeout = commandTimeout;
	}

	public int getMaxIdle() {
		return maxIdle;
	}

	public void setMaxIdle(int maxIdle) {
		this.maxIdle = maxIdle;
	}

	public int getMinIdle() {
		return minIdle;
	}

	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}

	public int getMaxRedirections() {
		return maxRedirections;
	}

	public void setMaxRedirections(int maxRedirections) {
		this.maxRedirections = maxRedirections;
	}

	public int getmaxWaitMillis() {
		return maxWaitMillis;
	}

	public void setmaxWaitMillis(int maxWaitMillis) {
		this.maxWaitMillis = maxWaitMillis;
	}

	public int getMaxActive() {
		return maxActive;
	}

	public void setMaxActive(int maxActive) {
		this.maxActive = maxActive;
	}

	public boolean isTestOnBorrow() {
		return testOnBorrow;
	}

	public void setTestOnBorrow(boolean testOnBorrow) {
		this.testOnBorrow = testOnBorrow;
	}

	public static String getINITIALIZEREDISUSERNAME() {
		return INITIALIZEREDISUSERNAME;
	}

	public static void setINITIALIZEREDISUSERNAME(String iNITIALIZEREDISUSERNAME) {
		INITIALIZEREDISUSERNAME = iNITIALIZEREDISUSERNAME;
	}


	
	
	

}